﻿using System;
using System.Collections.Generic;
using System.Text;
using MSDNWebcast.Models;

namespace MSDNWebcast.ViewModels
{
    /// <summary>
    /// 视频播放
    /// </summary>
    public class VideoPlayerViewModel : WorkspaceViewModel
    {

        public VideoPlayerViewModel()
        {
            this.PageInfo = "正在播放";
        }

        private CourseFile m_CourseFile;

        public override string DisplayName
        {
            get { return "视频播放"; }
        }

        /// <summary>
        /// 课件
        /// </summary>
        public CourseFile CourseFile
        {
            get { return m_CourseFile; }
            set
            {
                if (m_CourseFile != value)
                {
                    m_CourseFile = value;
                    OnPropertyChanged("CourseFile");
                    OnPropertyChanged("VideoPath");
                }
            }
        }

        /// <summary>
        /// 视频文件路径
        /// </summary>
        public string VideoPath
        {
            get
            {
                if (CourseFile == null) return "";
                return CourseFile.FilePath;
            }
        }
    }
}
